<!--
 * @Author: your name
 * @Date: 2021-08-06 15:23:27
 * @LastEditTime: 2021-08-06 15:33:46
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\3-html&css\day05\3-伪元素选择器.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伪元素选择器</title>
    <style>
         /* ::before  选中之前不存在的节点 然后结合content添加内容 */
        h2::before {
            content: "**";
            color:lightseagreen;
            
            
        }
        /* ::after    选中之后不存在的节点 然后结合content添加内容 */
        h2::after {
            content: "**";
            color:red;
            
            
        }
        /* ::first-letter   选中的第一个文本符号 */
        p::first-letter {
            font-size: 20px;
            color:mediumorchid;
        }
        /* ::first-line      选中的第一行 */
        p::first-line {
            font-size: 20px;
            color:yellow;
        }
        /* ::selection   选中的文本 */

        p::selection {
            color:mediumturquoise;
            background-color: orange;
        }
    </style>
</head>
<body>
    <div class="app">
        <h2>标题一</h2>
        <h2>标题二</h2>
        <h2>标题三</h2>
        <p>好好学习天天向上</p>
        <p>好好学习天天向上</p>
        <div>123-1</div>
        <div>123</div>
        <div>123-p1</div>
    </div>
</body>
</html>